﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MyDataDataContext db = new MyDataDataContext();
        if (Session["AdminID"] != null)
        {
            var username = (from r in db.Manager
                            where r.ManagerID == Session["AdminID"].ToString()
                            select r.ManagerName).First();
            Login1.Text ="管理员"+ username + "已登录";
        }

    }
}
